package apiday03;
import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo {
    public static void main(String[] args) {

        People p = new People();
        p.setAge(1);
        Collection c = new ArrayList();
        Point w = new Point(1,2);
        c.add(w);
        c.add("a");
        c.add("b");
        c.add('c');
        c.add((Integer) 1);
        c.add(p);
        System.out.println(c);
        c.remove("a");
        if(c.contains("a")){
            System.out.println("删除不成功");
        }else {
            System.out.println("删除成功");
        }
        System.out.println(c);

    }

}
class People{
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "People{" +
                "age=" + age +
                '}';
    }
}
